package net.neptech.model.sys;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.persistence.*;
import lombok.Data;
import net.neptech.utils.SnowflakeIdGenerator;
import org.hibernate.annotations.GenericGenerator;

import java.io.Serial;
import java.io.Serializable;

/**
 * @Author Saya
 * @Date 2025/8/12 15:40
 * @Description TODO
 **/
@Entity
@Table(name = "sys_user")
@TableName("sys_user")
@Data
public class User implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @Id
    @GenericGenerator(name = "snowflake", type = SnowflakeIdGenerator.class)
    @GeneratedValue(generator = "snowflake")
    @Column(name = "user_id", nullable = false)
    @TableId
    public Long userId;
    @Column(name = "username", columnDefinition = "varchar(255)")
    public String username;
    @Column(name = "password", columnDefinition = "varchar(255)")
    public String password;
    @Column(name = "user_contact", columnDefinition = "varchar(255)")
    public String userContact;
    @Column(name = "status", columnDefinition = "varchar(255)")
    public String status;
    @Column(name = "open_id", columnDefinition = "varchar(255)")
    public String openId;
    @Column(name = "avatar", columnDefinition = "varchar(255)")
    public String avatar;
}
